package com.ruoyi.activiti.domain;

import com.ruoyi.common.core.web.domain.BaseEntity;
import com.ruoyi.common.core.web.page.TableSupport;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class BaseCondition extends BaseEntity {

    @ApiModelProperty(value = "页码，从1开始")
    private Integer pageNum = TableSupport.PAGE_NUM_DEFAULT;

    @ApiModelProperty(value = "每页记录数")
    private Integer pageSize = TableSupport.PAGE_SIZE_DEFAULT;

    public Integer getPageNum(){
        return (this.pageNum!=null&&this.pageNum>=1)?this.pageNum: TableSupport.PAGE_NUM_DEFAULT;
    }

    public Integer getPageSize(){
        return (this.pageSize!=null&&this.pageSize>=1)?this.pageSize: TableSupport.PAGE_SIZE_DEFAULT;
    }
}
